package ge.info.domain.transport;

import ge.info.domain.City;

import ge.info.domain.Country;
import ge.ktools.StringUtils;
import java.io.Serializable;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: Mar 26, 2007
 * Time: 10:09:29 PM
 * To change this template use File | Settings | File Templates.
 */
public class Transport implements Serializable
{

    private int transportID;
    private TransportType transportType;
    private City outCity;
    private String ctm;
    private City inCity;
    private Country outCountry;
    private Country inCountry;
    private String outPlace;
    private String inPlace;
    private DayOfWeek day;
    private String outTime;
    private String inTime;
    private String transportPlane;
    private String transportNo;
    private String company;
    private String note;
    private String price;
    private int stopCount;
    private int direction;
    private boolean searchedFor;
    private String tripCriteria;
    private int notecrit;

    public int getTransportID()
    {
        return transportID;
    }

    public void setTransportID(int transportID)
    {
        this.transportID = transportID;
    }

    public String getOutTime()
    {
        return outTime;
    }

    public void setOutTime(String outTime)
    {
        this.outTime = outTime;
    }

    public String getInTime()
    {
        return inTime;
    }

    public void setInTime(String inTime)
    {
        this.inTime = inTime;
    }

     public String getCtm()
    {
        return ctm;
    }

    /**
     * @param code the code to set
     */
    public void setCtm(String ctm)
    {
        this.ctm = ctm;
    }

    public String getTransportPlane()
    {
        return transportPlane;
    }

    public void setTransportPlane(String transportPlane)
    {
        this.transportPlane = transportPlane;
    }

    public String getTransportNo()
    {
        return transportNo;
    }

    public void setTransportNo(String transportNo)
    {
        if (transportNo != null)
        {
            this.transportNo = transportNo.trim();
        } else
        {
            this.transportNo = transportNo;
        }
    }

    public String getCompany()
    {
        return company;
    }

    public void setCompany(String company)
    {
        this.company = company;
    }

    public String getNote()
    {
        return note;
    }

    public void setNote(String note)
    {
        this.note = note;
    }

    public String getPrice()
    {
        return price;
    }

    public void setPrice(String price)
    {
        this.price = price;
    }

    public DayOfWeek getDay()
    {
        return day;
    }

    public void setDay(DayOfWeek day)
    {
        this.day = day;
    }

    public City getOutCity()
    {
        return outCity;
    }

    public void setOutCity(City outCity)
    {
        this.outCity = outCity;
    }

    public Country getOutCountry()
    {
        return outCountry;
    }

    public void setOutCountry(Country outCountry)
    {
        this.outCountry = outCountry;
    }

    public City getInCity()
    {
        return inCity;
    }

    public void setInCity(City inCity)
    {
        this.inCity = inCity;
    }

    public Country getInCountry()
    {
        return inCountry;
    }

    public void setInCountry(Country inCountry)
    {
        this.inCountry = inCountry;
    }

    public TransportType getTransportType()
    {
        return transportType;
    }

    public void setTransportType(TransportType transportType)
    {
        this.transportType = transportType;
    }

    public String getOutPlace()
    {
        return outPlace;
    }

    public void setOutPlace(String outPlace)
    {
        if (outPlace != null)
        {
            this.outPlace = outPlace.trim();
        } else
        {
            this.outPlace = outPlace;
        }
    }

    public String getInPlace()
    {
        return inPlace;
    }

    public void setInPlace(String inPlace)
    {
        if (inPlace != null)
        {
            this.inPlace = inPlace.trim();
        } else
        {
            this.inPlace = inPlace;
        }

    }

    public int getStopCount()
    {
        return stopCount;
    }

    public void setStopCount(int stopCount)
    {
        this.stopCount = stopCount;
    }

    public int getDirection()
    {
        return direction;
    }

    public void setDirection(int direction)
    {
        this.direction = direction;
    }

    public List<String> getOutPlaces()
    {
        return StringUtils.splitString(outPlace);
    }

    public List<String> getInPlaces()
    {
        return StringUtils.splitString(inPlace);
    }

    /**
     * @return the searchedFor
     */
    public boolean isSearchedFor()
    {
        return searchedFor;
    }

    /**
     * @param searchedFor the searchedFor to set
     */
    public void setSearchedFor(boolean searchedFor)
    {
        this.searchedFor = searchedFor;
    }

    /**
     * @return the tripCriteria
     */
    public String getTripCriteria()
    {
        return tripCriteria;
    }

    /**
     * @param tripCriteria the tripCriteria to set
     */
    public void setTripCriteria(String tripCriteria)
    {
        this.tripCriteria = tripCriteria;
    }

    public int getNotecrit()
    {
        return notecrit;
    }

    public void setNotecrit(int notecrit)
    {
        this.notecrit = notecrit;
    }
}
